<template>
	<view class="swiper-item">
	  <swiper autoplay="true" interval="5000" duration="1000" :indicator-dots="bannerLength" circular="true" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#FF4444">
	    <swiper-item v-for="(item, index) in bannerList" :key="index" :data-index="index" @tap="banner">
	      <image :src="item.ad_pic" class="slide-image" />
	    </swiper-item>
	  </swiper>
	</view>
</template>

<script>
	export default{
		data(){
			return{
			}
		},
		props:["bannerLength","bannerList","index"],
		methods:{
			//轮播图跳转
			banner(e) {
			  console.log(e);
			  var index = e.currentTarget.dataset.index;
			  var list = this.bannerList[index].goods_id;
			  uni.navigateTo({
			    url: '/remao_shop/packageA/rushdetails/rushdetails?goods_id=' + list + '&ismiaosha=0'
			  });
			},
		}
	}
</script>

<style lang="scss">
	
	.swiper-item {
		height: 176px;
		swiper {
			display: block;
			height: 100%;
			.slide-image {
				width: 100%;
				height: 176px;
			}
			
		}
	}
	
	
	
</style>
